#include "ObjectOrder.h"
#include "Global.h"

namespace RisingStar
{

	CObjectOrder::CObjectOrder(TObjectProperty objPropert):CObject(objPropert)
	{		
		Init();
	}
	
	CObjectOrder::CObjectOrder()
	{
		Init();
	}
	
	CObjectOrder::~CObjectOrder()
	{

		
	}
	
	CObject::ObjectPtr CObjectOrder::Copy()
	{
		//cout<<"CObjectOrder Copy"<<endl;
		
		ObjectPtr pUser(new CObjectOrder(mObjectProperty));
		*pUser = (*this);

		return pUser;
	}
	
	bool CObjectOrder::Init()
	{
		nValues["对象类型"] = "订单";
		nValues["数据库类型"] = "区域";
		sGlobal.RequestCallbackMap["生成订单"] = CObjectOrder::ObjectCallbackUserRegister;
		sGlobal.RequestCallbackMap["删除订单"] = CObjectOrder::ObjectCallbackUserDel;
		return true;
	}
	
	bool CObjectOrder::ObjectCallbackUserRegister(CObject* obj)
	{
		cout<<"订单注册函数调用成功"<<endl;
		return true;
	}
	bool CObjectOrder::ObjectCallbackUserEdit(CObject* obj)
	{
		//cout<<"订单修改函数调用成功"<<endl;
		ObjectCallbackSqlEdit(obj);
		return true;
	}
	
	bool CObjectOrder::ObjectCallbackUserDel(CObject* obj)
	{
		ObjectCallbackSqlDel(obj);

		return true;
	}
	
	
	
	bool CObjectOrder::ObjectCallbackUserPasswordResetAndLogin(CObject* obj)
	{
		
		ObjectCallbackSqlAddOrEdit(obj);
		
		
		
		cout<<"密码重置并登录"<<endl;
		return true;
	}
	
	bool CObjectOrder::ObjectCallbackUserPasswordLogin(CObject* obj)
	{
		
		
		cout<<"密码登录"<<endl;
		return true;
	}
	
	bool CObjectOrder::ObjectCallbackUserIdentifyingCodeSend(CObject* obj)
	{
		cout<<"订单验证码发送"<<endl;
		return true;
	}
	
	
	
}

